package com.project.controller;

import com.project.bean.CountBean;
import com.project.service.ICountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;
import java.util.List;

/**
 * 销售统计控制器
 */
@RestController
@RequestMapping("count")
public class CountController {
    @Autowired
    private ICountService countService;
    /**
     * 销售统计
     * @param startDate 销售起始日期
     * @param endDate 销售结束日期
     * @return 统计集合
     */
    @RequestMapping("countSell")
    public List<CountBean> countSell(LocalDate startDate, LocalDate endDate){
        return countService.countSell(startDate,endDate);
    }
}
